/**
 * Unicorn Admin Template
 * Version 2.0.1
 * Diablo9983 -> diablo9983@gmail.com
**/

$(document).ready(function(){
	
	 $('select').select2();
	function format(state) {
	var originalOption = state.element;
		if (!state.id) return state.text; // optgroup
		return "<img class='game_keyins' src='"+base_url+"template/images/key/key_" + state.id.toLowerCase() + ".gif' /> " + state.text;
		
	}
	$("select.select2").select2({
		formatResult: format,
		formatSelection: format,
		escapeMarkup: function(m) { return m; }
	});
	
    $('.colorpicker').colorpicker();
    $('.datepicker').datepicker();
});
